package com.common.baselibrary.log;

import android.util.Log;

import com.common.baselibrary.common.BaseConstant;

/**
 * Created by zhangjianhui401 on 16/7/20.
 */
public class LogHelper {

    /**
     * 日志是否写在本地
     */
    public static final boolean NEED_WRITE = true;

    /**
     * Log打印级别
     */
    public static final int LOG_PRINT_LEVEL = Log.VERBOSE;

    /**
     * Log存储级别
     */
    public static final int LOG_SAVE_LEVEL = Log.VERBOSE;

    /**
     * 缓存日志文件跟目录
     */
    private static final String CACHE_LOG_DIRECTORY = BaseConstant.BASE_SDCARD_PATH + "/log";

    /**
     * 日志文件所属文件夹路径
     */
    public static final String CACHE_LOG_FILE_PATH = CACHE_LOG_DIRECTORY + "/record";

    /**
     * 日志文件所属文件夹路径
     */
    public static final String CRASH_LOG_FILE_PATH = CACHE_LOG_DIRECTORY + "/crash";

    /**
     * 日志文件所属文件夹路径
     */
    public static final String CACHE_LOG_FOLDER_PATH_TEMP = CACHE_LOG_DIRECTORY + "/record_temp";

    /**
     * 临时txt文件目录
     */
    //public static final String CACHE_LOG_FILE_PATH_TEMP = CACHE_LOG_FOLDER_PATH_TEMP + "/upload.txt";

    /**
     * 日志类型：Native
     */
    public static final String LOG_TYPE_NATIVE = "N";

    /**
     * 日志类型：H5
     */
    public static final String LOG_TYPE_H5 = "H";

    /**
     * Log日志文件后缀
     */
    public static final String LOG_FILE_SUFFIX = ".txt";

    /**
     * Log日志压缩文件后缀
     */
    public static final String LOG_ZIP_FILE_SUFFIX = ".zip";

    /**
     * Log日志文件名
     */
    public static final String LOG_NORMAL_FILE_NAME = "pa_log_record" + LOG_FILE_SUFFIX;

    /**
     * 保存日志文件的最大个数
     */
    public static final int MAX_LOG_FILE_NUM = 3;

    /**
     * 文件最大值2M
     */
    public static final int MAX_LOG_FILE_SIZE = 2 * 1024 * 1024;
}
